<template>
    <div>
        <el-container>
            <el-main>
                <el-row>
                    <el-col :span="customer.status ? 24 : 16" class="height-handle">
                        <!-- 客户信息 -->
                        <el-row :span="24" class="customer_info">
                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">企业名称: </el-col>
                                    <el-col :span="12">{{ customer.customerName }}</el-col>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">法定代表人: </el-col>
                                    <el-col :span="12">{{ customer.legalLeader }}</el-col>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">成立日期：</el-col>
                                    <el-col :span="12">{{ customer.registerDate }}</el-col>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">所属行业：</el-col>
                                    <el-col :span="12">{{ customer.industry }}</el-col>
                                </div>
                            </el-col>


                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">所属地区：</el-col>
                                    <el-col :span="12">
                                        <dict-tag :options="dict.type.cus_province_type" :value="customer.province">
                                        </dict-tag>
                                    </el-col>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">经营状态：</el-col>
                                    <el-col :span="12">
                                        <dict-tag :options="dict.type.cus_open_status" :value="customer.openState">
                                        </dict-tag>
                                    </el-col>
                                </div>
                            </el-col>


                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">录入人：</el-col>
                                    <el-col :span="12">{{ customer.inputUser }}</el-col>
                                </div>
                            </el-col>
                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">营销人：</el-col>
                                    <el-col :span="12">{{ customer.inputUser }}</el-col>
                                </div>
                            </el-col>


                            <el-col :span="12">
                                <div class="form-group">
                                    <el-col :span="12">录入时间：</el-col>
                                    <el-col :span="12">{{ customer.inputTime }}</el-col>
                                </div>
                            </el-col>

                        </el-row>
                    </el-col>
                </el-row>
            </el-main>
        </el-container>
    </div>
</template>
<script>
import { getCustomer } from "@/api/custom/customer";
export default {
    name: "customerDetail",
    dicts: ['cus_open_status', 'cus_province_type'],
    data() {
        return {
            id: this.$route.query.customerId,
            customer: {}
        }
    },
    created() {
        this.getDetail();
    },

    methods: {
        getDetail() {
            getCustomer(this.id).then((response) => {
                this.customer = response.data;
            });
        }
    }

};
</script>
  
<style lang="scss" scoped>
.customer_info {
    background-color: #fff;
    border-radius: 6px;
    padding-top: 5px;
    padding-bottom: 13px;
    box-shadow: 1px 1px 3px rgb(0 0 0 / 20%);
    padding-left: 45px;
    color: #333;
    font-size: 14px;

    .form-group {
        line-height: 25px;
    }
}
</style>